<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
</head>

<body>


    <script>
        function *aa(aa, bb) {
            alert(10);
            let str=yield;
            alert(aa);
            alert(bb);
            alert(str)
        }
        var fun=aa(10,29);
        fun.next(100);  //不能传参
        fun.next(200)
    </script>
</body>

</html>